﻿<%@ Page Language="C#" MasterPageFile="~/Home.Master" AutoEventWireup="true" CodeBehind="Locations.aspx.cs"
    Inherits="SLIITPro.SysUsers.Locations" Title="Location Page" %>

<%@ Register Assembly="TimePicker" Namespace="MKB.TimePicker" TagPrefix="MKB" %>
<asp:Content ID="Content1" ContentPlaceHolderID="BodyContentPlaceHolder" runat="server">
    <fieldset>
        <legend>Register your Location</legend>
        <table style="width: 100%" id="regBusiness" class="gridtable" runat="server">
            <tr>
                <td>
                    <table style="width: 100%" class="gridtable">
                        <tr>
                            <td>
                                Location Name
                            </td>
                            <td>
                                <asp:TextBox ID="txtBusinessName" runat="server" Width="175px" CssClass="droplist"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfBName" runat="server" ControlToValidate="txtBusinessName"
                                    Display="Dynamic" ErrorMessage="Required" ValidationGroup="B"><img src="../Images/InputError.png" alt="Required" /></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Location Type
                            </td>
                            <td>
                                <asp:DropDownList ID="cmbBusinessType" runat="server" CssClass="droplist" 
                                    Width="175px">
                                    <asp:ListItem>business</asp:ListItem>
                                    <asp:ListItem>location</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Phone
                            </td>
                            <td>
                                <asp:TextBox ID="txtBusinessPhone" runat="server" Width="175px" CssClass="droplist"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfBPhone" runat="server" ControlToValidate="txtBusinessPhone"
                                    Display="Dynamic" ErrorMessage="Required" ValidationGroup="B"><img src="../Images/InputError.png" alt="Required" /></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="regPhone" runat="server" ControlToValidate="txtBusinessPhone"
                                    Display="Dynamic" ErrorMessage="&lt;br /&gt;Please enter a phone number in the format:&lt;br /&gt;+94xxxxxxxxx"
                                    ValidationExpression="^[+][0-9]\d{2}[0-9]\d{7}" ValidationGroup="B"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Fax
                            </td>
                            <td>
                                <asp:TextBox ID="txtBusinessFax" runat="server" Width="175px" CssClass="droplist"></asp:TextBox>
                                <asp:RegularExpressionValidator ID="regFax" runat="server" ControlToValidate="txtBusinessFax"
                                    Display="Dynamic" ErrorMessage="&lt;br /&gt;Please enter a phone number in the format:&lt;br /&gt;+94xxxxxxxxx"
                                    ValidationExpression="^[+][0-9]\d{2}[0-9]\d{7}" ValidationGroup="B"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Email
                            </td>
                            <td>
                                <asp:TextBox ID="txtBusinessEmail" runat="server" Width="175px" CssClass="droplist"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfBEmail" runat="server" ControlToValidate="txtBusinessEmail"
                                    Display="Dynamic" ErrorMessage="Required" ValidationGroup="B"><img src="../Images/InputError.png" alt="Required" /></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="regBEmail" runat="server" ControlToValidate="txtBusinessEmail"
                                    Display="Dynamic" ErrorMessage="&lt;br /&gt;Please enter a Email address in the format:&lt;br /&gt;name@yourdomian.com"
                                    ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ValidationGroup="B"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Web
                            </td>
                            <td>
                                <asp:TextBox ID="txtBusinessWeb" runat="server" Width="175px" CssClass="droplist"></asp:TextBox>
                                <asp:RegularExpressionValidator ID="regBWeb" runat="server" ControlToValidate="txtBusinessWeb"
                                    Display="Dynamic" ErrorMessage="&lt;br /&gt;Please enter a Web address in the format:&lt;br /&gt;www.yourdomian.com"
                                    ValidationExpression="([\w-]+\.)+[\w-]+(/[\w- ./?%&amp;=]*)?" ValidationGroup="B"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Address
                            </td>
                            <td>
                                &nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td>
                                &emsp;Country
                            </td>
                            <td>
                                <asp:DropDownList ID="cmbCountry" runat="server" CssClass="droplist" Width="175px" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                &emsp; City
                            </td>
                            <td>
                                <asp:TextBox ID="txtBusinessCity" runat="server" Width="175px" CssClass="droplist"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfBCity" runat="server" ControlToValidate="txtBusinessCity"
                                    Display="Dynamic" ErrorMessage="Required" ValidationGroup="B"><img src="../Images/InputError.png" alt="Required" /></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                &emsp; Street
                            </td>
                            <td>
                                <asp:TextBox ID="txtBusinessStreet" runat="server" Width="175px" CssClass="droplist"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="rfBStreet" runat="server" ControlToValidate="txtBusinessStreet"
                                    Display="Dynamic" ErrorMessage="Required" ValidationGroup="B"><img src="../Images/InputError.png" alt="Required" /></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Cuisine Type (if restaurent)
                            </td>
                            <td>
                                <asp:TextBox ID="txtBusinessCType" runat="server" Width="175px" CssClass="droplist"></asp:TextBox>
                            </td>
                        </tr>
                    </table>
                </td>
                <td valign="top">
                    <table style="width: 100%;" class="gridtable">
                        <tr>
                            <td>
                                Image Upload
                            </td>
                            <td>
                                <asp:FileUpload ID="ImgUpload" runat="server" Width="300px" CssClass="droplist" />
                                <asp:Button ID="btnUpload" runat="server" CssClass="cssbutton" Text="Upload" ValidationGroup="img"
                                    Width="75px" />
                                <asp:RequiredFieldValidator ID="rfBUpload" runat="server" ControlToValidate="ImgUpload"
                                    Display="Dynamic" ErrorMessage="required" ValidationGroup="img"><img src="../Images/InputError.png" alt="Required" /></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <div id="imgplc" style="width: 500px">
                                    <asp:PlaceHolder ID="ImageAlbum" runat="server"></asp:PlaceHolder>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <asp:Label ID="lblMessage" runat="server" Font-Bold="True" Font-Size="Small" ForeColor="Blue"></asp:Label>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <div class="buttondiv">
                        <asp:Button ID="btnRegister" runat="server" Text="Register" CssClass="cssbutton"
                            ValidationGroup="B" Width="75px" OnClick="btnRegister_Click" />
                    </div>
                </td>
            </tr>
        </table>
    </fieldset>
</asp:Content>
